<?php
    include "include/admin_function.php";
    valid_admin();
    if (!isset($_POST['submit']))
        header("Location: index");
    if ($_POST['submit'] == "Validate") {
        if (!empty($_POST['checked']))
            validate_user($_POST['checked']);
    }
    if ($_POST['submit'] == "Delete") {
        if (!empty($_POST['checked']))
            delete_tmp_user($_POST['checked']);        
    }
    header("Location: validate_user");
?>
